<template>
	<div class="screen-block-component" :class="[!title?'no-title':'']">
		<div class="title no-wrap" v-if="title"><div class="title-inner">{{title}}</div></div>
		<div class="container">
			<slot></slot>
		</div>
	</div>
</template>

<script setup>
const props = defineProps({
	title:{
		type:String,
		default:''
	}
})
</script>

<style scoped lang="scss">
.screen-block-component{
	width: 100%;
	height: 100%;
	background: rgba(6,48,109,.5);
	position: relative;
	box-sizing: border-box;
	$topSize:.76em;
	padding-top: $topSize;
	&.no-title{
		padding-top: 0;
	}
	&>.title{
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: $topSize;
		.title-inner{
			font-size: .3em;
			color: #fff;
			position: relative;
			padding: .75em 1em;
			background-color: rgba(176,196,222,.2);
			&::before{
				position: absolute;
				height: .8em;
				width: 4px;
				background: #49bcf7;
				border-radius: 5px;
				content: "";
				left: .4em;
				top: 50%;
				margin-top: -.4em;
			}
		}
	}
	&>.container{
		height: 100%;
	}
}
</style>